Technical Field
This disclosure relates to processors, and more specifically to atomic processor instructions and suspending execution of processor threads.
Description of the Related Art
In some processing environments, multiple processor threads may execute on a processor core. Processor “threads” may also be referred to as “strands” or “virtual processors.” Different threads on a processor core may share processing resources, including memory. Similarly, in multi-core and/or multi-processor systems, threads running on different processor cores and/or different processors may share processing resources. Synchronization between processor threads may involve a shared memory location that is written by one thread to indicate that another waiting thread can begin or continue execution. In this case, the waiting thread may “spin” by executing a loop to repeatedly check the shared memory location for a write indicating that execution may continue. Spinning may be inefficient, however. Accordingly, it is desirable to pause, suspend, or modify execution of a waiting thread until a write to the shared memory location is detected.